package com.itshare.video.service;


import com.itshare.video.common.dto.PageEntity;
import com.itshare.video.common.dto.Result;
import com.itshare.video.common.dto.ViewObject;
import com.itshare.video.pojo.bo.VideoCreateBO;
import com.itshare.video.pojo.dto.UserTokenDTO;
import com.itshare.video.pojo.dto.VideoCommentDTO;
import com.itshare.video.pojo.po.Video;
import com.itshare.video.pojo.po.VideoComment;
import com.itshare.video.pojo.query.VideoQueryCondition;
import com.itshare.video.pojo.vo.VideoSearchVO;

/**
* @Author lyr
* @create 2020/10/24 08:42
*/
public interface VideoService {


    /**
     * 老师上传，并且发布了一个视频
     * @param videoCreateBO
     * @return
     */
    Result<?> createVideoInfo(VideoCreateBO videoCreateBO);


    /**
     * 更新发布的视频信息
     * @param videoCreateBO
     * @return
     */
    ViewObject updateVideoInfo(VideoCreateBO videoCreateBO);

    /**
     * 获取用户个人发布的视频信息
     * @param userTokenDTO
     * @return
     */
    Result<?> getUserVideoOfPublish(UserTokenDTO userTokenDTO,Integer page,Integer size);


    /**
     * 按照查询条件进行搜索
     * @return
     */
    Result<?> searchVideoBy(VideoQueryCondition queryCondition);


    /**
     * 用户视频点赞
     * @param videoId
     * @return
     */
    Result<?> likeVideo(Integer videoId,Integer userId);


    /**
     * 视频评论
     * @return
     */
    Result<?> commentVideo(VideoCommentDTO videoCommentDTO,Long videoId,UserTokenDTO userTokenDTO);


    /**
     * 返回评论列表
     * @return
     */
    ViewObject getVideoComment(Integer videoId,Integer page,Integer size);

    /**
     * 获取子评论
     * @param parentCommentId
     * @param videoId
     * @param page
     * @param size
     * @return
     */
    Result<PageEntity<VideoComment>>getVideoCommentChilds(Integer parentCommentId, Integer videoId, Integer page,Integer size);


    /**
     * 获取视频 根据ID
     * @param videoId
     * @return
     */
    Result<Video> getVideoById(Long videoId);


    /**
     * 逻辑删除视频
     * @param videoId
     * @return
     */
    Result<?> logicDeleteVideo(Integer videoId);


    /**
     * 获取所有被举报了的视频
     * @return
     */
    Result<?> getAllVideoBeReported(Integer page,Integer size);

}


